﻿namespace SuperMarieApi.App.Controllers.Framework.DataAccess.Config
{
    using System;
    using System.Data;
    using System.Xml.Serialization;

    [Serializable]
    public class DataCommandConfig
    {
        [XmlAttribute("name")]
        public string Name { get; set; }

        [XmlAttribute("database")]
        public string Database { get; set; }

        [XmlAttribute("commandType")]
        public CommandType CommandType { get; set; }

        [XmlAttribute("timeout")]
        public int Timeout { get; set; }

        [XmlElement("commandText")]
        public string CommandText { get; set; }

        [XmlArray("parameters")]
        [XmlArrayItem("param", typeof(ParameterConfig))]
        public ParameterConfig[] Parameters { get; set; }

        [XmlArray("orderFields")]
        [XmlArrayItem("field", typeof(OrderFieldConfig))]
        public OrderFieldConfig[] OrderFields { get; set; }
    }
}
